* emacsserver.c (main): When we're passing a `struct sockaddr_un'
authorJim Blandy <jimb@redhat.com>
Wed, 9 Jun 1993 12:41:31 +0000 (12:41 +0000)
committerJim Blandy <jimb@redhat.com>
Wed, 9 Jun 1993 12:41:31 +0000 (12:41 +0000)
to bind or accept, cast the pointer, to avoid warnings on systems
which declare prototypes for this.

lib-src/emacsserver.c

index fc5f33da985fa094d755bc93d19fc0678728d0e6..769d87e1e8a0b93f7afc366ab67570865b1404de 100644 (file)
@@ -108,7 +108,7 @@ main ()
   unlink (server.sun_path);
 #endif
 
-  if (bind (s, &server, strlen (server.sun_path) + 2) < 0)
+  if (bind (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2) < 0)
     {
       perror ("bind");
       exit (1);
@@ -135,7 +135,7 @@ main ()
        {
          fromlen = sizeof (fromunix);
          fromunix.sun_family = AF_UNIX;
-         infd = accept (s, &fromunix, &fromlen); /* open socket fd */
+         infd = accept (s, (struct sockaddr *) &fromunix, &fromlen); /* open socket fd */
          if (infd < 0)
            {
              if (errno == EMFILE || errno == ENFILE)